package schedule.imp;

import schedule.PaymentSchedule;

import java.util.Calendar;
import java.util.Date;

public class MonthlySchedule implements PaymentSchedule {
    public MonthlySchedule() {
    }

    @Override
    public boolean isPayDate(Date payDate) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(payDate);
        calendar.add(Calendar.DAY_OF_MONTH, 1);
        return calendar.get(Calendar.DAY_OF_MONTH) == 1;
    }
}
